package com.zhiyou100.modify;

/**
 * public修饰的公开的类
 * default修饰的类： 此时default不用写，只能在同包下使用
 */
public class Student {
    public String name;
    protected String num;
    double score;
    private int age;

    public void test(){
        System.out.println(name + "有使用权限.....");
        System.out.println("num = " + num);
        System.out.println("score = " + score);
        System.out.println("age = " + age);
    }

    public static void main(String[] args) {
        Student student = new Student();
        student.name = "张三";
        student.score = 89.5;
        student.age = 20;
        student.num = "2018897546";
        student.test();
    }

}

//在一个类文件中，可以定义多个类，但是只能有一个public修饰的类

